From fee7a47abad94996cf88604e295c13b5e33a7212 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Tue, 24 Jun 2014 11:10:27 -0700 Subject: [PATCH] Correct installation to follow standards --- .travis.yml | 1 + Makefile | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c43ad30f5..b921ca20d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,6 +7,7 @@ script: - ./.travis.check.style.sh - make CC="$CC" RUSTC="$RUSTC" -j4 - make CC="$CC" RUSTC="$RUSTC" test -j4 + - make install DESTDIR=${PWD}/destdir env: - ARCH=i686 CC='cc -m32' diff --git a/Makefile b/Makefile index 057a5e7a7..ede17f22b 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,8 @@ RUSTC ?= rustc RUSTC_FLAGS ?= -DESTDIR ?= /usr/local +DESTDIR ?= +PREFIX ?= /usr/local +BINDIR ?= $(PREFIX)/bin # Link flags to pull in dependencies BINS = cargo \ @@ -75,7 +77,8 @@ distclean: clean cd libs/toml-rs && make clean install: - cp target/cargo target/cargo-* $(DESTDIR)/bin + install -d $(DESTDIR)$(BINDIR) + install target/cargo target/cargo-* $(DESTDIR)$(BINDIR) # Setup phony tasks .PHONY: all clean distclean test test-unit test-integration libcargo -- 2.30.2